import Koa from "koa"; //通过ES Module导入
const cors = require("@koa/cors");
import { router } from "./router";

const bodyParser = require("koa-bodyparser");

const app = new Koa();
app.use(bodyParser());
app.use(cors());
app.use(router.routes());

app.listen(3000, () => {
  console.log("listen 3000 OK");
});
